/***************************************************************************
 *   %<%NAME%>%.%<%EXTENSION%>%                                            *
 *   Created on %<%DATE%>%, %<%TIME%>%                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "header.h"

/**
 * Function called at the engine stop, just before shot down. In here one
 * can put the finalization code e.g. releasing resources.
 */
void ENGINE_Exit(void) {

    /* TODO: place finalizing code here */

    MGPI_ENGINE_STOP
    MGPI_Exit();
    return;
}

/**
 * A initialization function, called at the begining of the application. In here
 * one can put any code concerning loading objects, preparing the scene etc.
 */
void ENGINE_Init(Roeskva_t *ctx) {
    {
        MGPI_ENGINE_CREATE_CAMERA(MGPI_PERSPECTIVE);

        /* TODO: place scene and engine setup here */

    } MGPI_ENGINE_START
    return;
}

/**
 * The engine main rendering loop function. Place here any code refering
 * to rendering process. Note that calling here any logic processing functions
 * is not advisable.
 */
void ENGINE_Render(Roeskva_t *ctx) {
    ctx->updateCamera(MGPI_ENGINE_CAMERA);
    {

        /* TODO: place your rendering code here */

    }
    ctx->commitChanges();
    return;
}
